<template>
  <div class="option">
    <el-radio :label="option"> </el-radio>
    <span>{{ option }}：</span>
    <el-input v-model="value"></el-input>
    <el-upload
      style="font-size: 12px"
      class="avatar-uploader"
      ref="otherLicense"
      action="#"
      list-type="picture-card"
      multiple
      :on-change="beforeuploadimg"
      :http-request="fileiupload"
    >
      上传图片
      <i
        class="el-icon-circle-close"
        style="position: absolute; top: -5px; right: -6px; font-size: 12px"
      ></i>
    </el-upload>
  </div>
</template>

<script>
export default {
  props: {
    option: {
      type: String,
      default: ''
    },
    value: {
      type: String,
      default: ''
    }
  },
  watch: {
    value (newValue, oldValue) {
      this.$emit('input', this.value)
    }
  },
  methods: {
    beforeuploadimg (file) {
      // console.log(file)
    },
    async fileiupload (file) {

    }
  }
}
</script>

<style scoped lang="scss">
.option {
  margin: 10px 0;
  .el-input {
    width: 240px;
  }
  .avatar-uploader {
    position: relative;
    display: inline-block;
    vertical-align: middle;
    margin-left: 10px;
    ::v-deep .el-upload--picture-card {
      width: 100px;
      height: 60px;
      line-height: 60px;
    }
  }
}
</style>
